
using System;
using System.Collections;
using System.Collections.Generic;

public class DataItem
{
	public event DataCenterHandler listeners;

	private string mName;
	public string Name{
		get{return mName;}
		private set{}
	}

	private Object mValue;
	public Object Value {
		get{ return mValue;}
		set{
			if (!Object.Equals(value, Value))
			{
				mLastValue = mValue;
				mValue = value;
				if (listeners != null)
					listeners(mName, mValue, mLastValue);
			}
		}
	}

	private Object mLastValue;
	public Object LastValue {
		get{return mLastValue;}
		private set{}
	}
	
	public DataItem(string name, Object value)
	{
		mName = name;
		mValue = value;
	}
}